package com.ctgu.examonline.service.serviceImpl;

import com.ctgu.examonline.dao.ProblemDao;
import com.ctgu.examonline.entity.Problem;
import com.ctgu.examonline.service.ProblemService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProblemServiceImpl implements ProblemService {

    @Resource
    ProblemDao problemDao;

    @Override
    public void save(Problem problem) {
        problemDao.save(problem);
    }

    @Override
    public void remove(Integer pro_no) {
        problemDao.remove(pro_no);
    }

    @Override
    public void update(Problem problem) {
        problemDao.update(problem);
    }

    @Override
    public List<Problem> listProblem() {
        return problemDao.listAllProblem();
    }
}
